import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const routes = [
  {
    path: "/login",
    component: () => import("@/views/login/index"),
  },
  {
    path: "/",
    component: () => import("@/views/layout/index"),
    redirect: "/homepage",
    children: [
      {
        path: "/homepage",
        component: () => import("@/views/homepage/index"),
      },
      {
        path: "/maintenance",
        component: () => import("@/views/maintenance/index"),
      },
      {
        path: "/operation",
        component: () => import("@/views/operation/index"),
      },
    ],
  },
];

const router = new Router({
  routes,
});

export default router;
